package com.probox.common.entity.vo.proboxService.view;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.utils.money.MoneyUtils;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 预约使用的vo
 */
@Data
public class SubscribeItemVo implements java.io.Serializable {
    private String limitUseTimes;

    /**
     * 使用次数
     */
    private String usesTimes;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    private Long surplusUserTimes;

    private Long itemId;

    private String itemName;

    private String isLockDevice;

    private Long itemSettlementPrice;

    public String getItemSettlementPriceStr() {
        if (ObjectUtil.isEmpty(itemSettlementPrice)) {
            return "";
        }
        return MoneyUtils.changeF2Y(itemSettlementPrice);
    }

    private String itemMainImage;

    private Long recordId;


//    private List<Long> slaveServiceItemIds;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /**
     * 类型
     */
    private String serviceItemType;

    /**
     * 卡券id
     */
    private Long cardId;


    private String isUnLimit;

    private String skuName;
    private Long skuId;
}
